package com.hanfu.ucenter.web.dao;

import com.hanfu.ucenter.web.bean.Member;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;



public interface MemberMapper extends Mapper<Member> {


    @Select("select * from fa_member where id = #{memberId}")
    Member findByMemberId(@Param("memberId") Long memberId);

    @Select("select * from fa_member where idcard = #{idCard} and rz_status=1")
    Member findIdCard(@Param("idCard") String idCard);


    @Update("update fa_member set realname=#{realName},idcard=#{idCard},zm_card=#{frontIdPic},fm_card=#{backIdPic},apply_time=#{applyTime},rz_type=1,rz_status=2 where id=#{memberId}")
    int submitAuthentication(@Param("memberId") Long memberId,@Param("realName") String realName,@Param("idCard") String idCard,@Param("frontIdPic") String frontIdPic,@Param("backIdPic") String backIdPic,@Param("applyTime") Long applyTime);
}